package com.mall.controller;


import com.mall.pojo.ResponseMessage;
import com.mall.service.IOrderItemService;
import org.springframework.web.bind.annotation.*;

/**
 * @author ShouPeng
 * @since 2023-04-17
 */
@RestController
@RequestMapping("/user/orderItem")
@CrossOrigin
public class OrderItemController {
    final
    IOrderItemService orderItemService;

    public OrderItemController(IOrderItemService orderItemService) {
        this.orderItemService = orderItemService;
    }

    @GetMapping
    public ResponseMessage queryOrderItemById(@RequestParam Integer orderId){
        return ResponseMessage.success(orderItemService.queryOrderItemById(orderId));
    }

}

